home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / gcc263-src.lha / gcc-2.6.3 / config / m68k / altos3068.h < prev    next >
C/C++ Source or Header  |  1993-10-02  |  4KB  |  137 lines

  1. /* Definitions of target machine for GNU compiler.  Altos 3068 68020 version.
  2.    Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc.
  3.  
  4. Written by Jyrki Kuoppala <jkp@cs.hut.fi>
  5. Last modified: Mon Mar  6 22:47:58 1989
  6.  
  7. This file is part of GNU CC.
  8.  
  9. GNU CC is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2, or (at your option)
  12. any later version.
  13.  
  14. GNU CC is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. GNU General Public License for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with GNU CC; see the file COPYING.  If not, write to
  21. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  22.  
  23.  
  24. #include "m68k/m68k.h"
  25.  
  26. /* See m68k.h.  7 means 68020 with 68881.  */
  27. /* 5 is without 68881.  Change to 7 if you have 68881 */
  28.  
  29. #ifndef TARGET_DEFAULT
  30. #define TARGET_DEFAULT 5
  31.  
  32. /* Don't try using XFmode.  */
  33. #undef LONG_DOUBLE_TYPE_SIZE
  34. #define LONG_DOUBLE_TYPE_SIZE 64
  35. #endif
  36.  
  37. /* Define __HAVE_68881__ in preprocessor,
  38.    according to the -m flags.
  39.    This will control the use of inline 68881 insns in certain macros.
  40.    Also inform the program which CPU this is for.  */
  41.  
  42. #if TARGET_DEFAULT & 02
  43.  
  44. /* -m68881 is the default */
  45. #define CPP_SPEC \
  46. "%{!msoft-float:-D__HAVE_68881__ }\
  47. %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
  48.  
  49. #else
  50.  
  51. /* -msoft-float is the default */
  52. #define CPP_SPEC \
  53. "%{m68881:-D__HAVE_68881__ }\
  54. %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
  55.  
  56. #endif
  57.  
  58. /* -m68000 requires special flags to the assembler.  */
  59.  
  60. #define ASM_SPEC \
  61.  "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
  62.  
  63. /* Names to predefine in the preprocessor for this target machine.  */
  64.  
  65. #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix -Asystem(unix)  -Acpu(m68k) -Amachine(m68k)"
  66.  
  67. /* Every structure or union's size must be a multiple of 2 bytes.  */
  68.  
  69. #define STRUCTURE_SIZE_BOUNDARY 16
  70.  
  71. /* Generate calls to memcpy, memcmp and memset.  */
  72. #define TARGET_MEM_FUNCTIONS
  73.  
  74. /* We use gnu assembler, linker and gdb, so we want DBX format.  */
  75.  
  76. #define DBX_DEBUGGING_INFO
  77.  
  78. /* Tell some conditionals we will use GAS.  Is this really used?  */
  79.  
  80. #define USE_GAS
  81.  
  82. /* This is how to output an assembler line defining a `double' constant.  */
  83.  
  84. #undef ASM_OUTPUT_DOUBLE
  85. #define ASM_OUTPUT_DOUBLE(FILE,VALUE)            \
  86.   do { char dstr[30];                    \
  87.        REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);    \
  88.        fprintf (FILE, "\t.double 0r%s\n", dstr);    \
  89.      } while (0)
  90.  
  91. /* This is how to output an assembler line defining a `float' constant.  */
  92.  
  93. #undef ASM_OUTPUT_FLOAT
  94. #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  95.   do { char dstr[30];                    \
  96.        REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);    \
  97.        fprintf (FILE, "\t.single 0r%s\n", dstr);    \
  98.      } while (0)
  99.  
  100. #undef ASM_OUTPUT_FLOAT_OPERAND
  101. #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)        \
  102.  do {                                \
  103.       if (CODE == 'f')                        \
  104.         {                            \
  105.           char dstr[30];                    \
  106.           REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr);        \
  107.       fprintf (FILE, "#0r%s", dstr);            \
  108.         }                            \
  109.       else                            \
  110.         {                            \
  111.           long l;                        \
  112.           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);        \
  113.           if (sizeof (int) == sizeof (long))            \
  114.             asm_fprintf ((FILE), "%I0x%x", l);            \
  115.           else                            \
  116.             asm_fprintf ((FILE), "%I0x%lx", l);            \
  117.         }                            \
  118.      } while (0)
  119.  
  120. #undef ASM_OUTPUT_DOUBLE_OPERAND
  121. #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)        \
  122.   do { char dstr[30];                    \
  123.        REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);    \
  124.        fprintf (FILE, "#0r%s", dstr);            \
  125.      } while (0)
  126.  
  127. /* Return pointer values in both d0 and a0.  */
  128.  
  129. #undef FUNCTION_EXTRA_EPILOGUE
  130. #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE)            \
  131. {                                \
  132.   extern int current_function_returns_pointer;            \
  133.   if ((current_function_returns_pointer) &&             \
  134.       ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))\
  135.     fprintf (FILE, "\tmovel d0,a0\n");                \
  136. }
  137.